package playn.game.backgrounds;

import static playn.core.PlayN.graphics;
import playn.core.Canvas;
import playn.core.CanvasImage;
import playn.core.ImageLayer;
import playn.game.core.Color;
import playn.game.core.Game;

public class Landscape {

	public ImageLayer layer;
	
	@SuppressWarnings("static-access")
	public Landscape(){
		
		layer=graphics().createImageLayer();
		CanvasImage canvasImage=graphics().createImage(Game.SCREEN_WIDTH, Game.SCREEN_HEIGHT);
		layer.setImage(canvasImage);

		Canvas c=canvasImage.canvas();
		
		for(int x=0;x<Game.SCREEN_WIDTH;x++){
			for(int y=0;y<Game.SCREEN_HEIGHT;y++){
				c.setFillColor(new Color().HSBtoColor(((float)x/Game.SCREEN_WIDTH),1, 1));
				c.fillRect(x, y, 1,1);
			}
		}
		
	}
	
}
